package com.test.langchain4j.config;

import com.test.langchain4j.service.Context7McpService;
import dev.langchain4j.model.chat.StreamingChatModel;
import java.util.Collections;
import java.util.List;
import org.springframework.context.annotation.Bean;

/**
 * Created with IntelliJ IDEA.
 *
 * @description:
 * @author: liuziyang
 * @since: 2025/8/8 16:09
 * @modifiedBy:
 * @version: 1.0
 */
// @Configuration
public class DocMcpConfig {
  @Bean
  public Context7McpService contextMcpService(StreamingChatModel streamingChatModel) {
    return AiServiceFactory.getAiService(
        Context7McpService.class,
        streamingChatModel,
        List.of("cmd", "/c", "npx", "-y", "@upstash/context7-mcp"),
        Collections.emptyMap());
  }
}
